home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-07-12 | 1.2 KB | 35 lines | [TEXT/GEOL] |
- Item 6734969 11-July-89 09:50
-
- From: UK0004 Bacchus & Smith, Paul Smith
-
- To: ROSENSTEIN1 Rosenstein, Larry
-
- cc: MACAPP.TECH$ MACAPP Tech
-
- Sub: Virtual method calls in OP
-
- Larry,
-
- I refer to your link last month in which you described how the Object Pascal
- method despatcher works. One point that is unclear to me is this:
-
- I understand that there is one method table for each polymorphic method in an
- OP program. This is an inversion of the technique used by Microsoft's QP, where
- they have one table for each class containing a pointers to all the methods for
- that class: each descendant VMT is a duplicate of its ancestor, with the
- exception of new and overidden methods.
-
- In Apple OP: The method dispatcher needs to identify which, out of the entries
- in a VMT, is appropriate to the object whose method is being called. How does
- it do this? Does it get passed some secret class ID that it uses to look up
- (elsewhere) the offset into the method table? Or is some other technique used?
-
- Is the overhead on polymorphic method calls fixed, or is it O(override depth)?
-
- Regards,
-
- Paul
- ----
-
-
-